import { createApp } from "vue"
import App from "./App.vue"
// import { createRouter,createWebHashHistory } from "vue-router"
import router from "./router"
import '@/assets/css/global.css'

import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
//app的定义和使用顺序 使用之前先定义
const app = createApp(App)


// 导入图标库 使用for...of循环遍历图标库所有组件 并注册到app中
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}


app.use(router)
app.mount("#app")
app.use(ElementPlus,{locale: zhCn})

